home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h / Error < prev    next >
Text File  |  1996-05-21  |  2KB  |  46 lines

  1.  
  2. #ifndef __Desk_Error_h
  3. #define __Desk_Error_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef __Desk_Core_h
  8. #include "Desk.Core.h"
  9. #endif
  10. extern void Desk_Error_ReportInternal(int errornum, const char *report, ...);
  11. extern void Desk_Error_ReportFatalInternal(int errornum, const char *report, ...);
  12. extern void Desk_Error_Report(int errornum, const char *report, ...);
  13. extern void Desk_Error_ReportFatal(int errornum, const char *report, ...);
  14. extern Desk_bool Desk_Error_Check(const Desk_os_error *error);
  15. extern void Desk_Error_CheckFatal(const Desk_os_error *error);
  16. extern Desk_bool Desk_Error_OutOfMemory(Desk_bool fatal, const char *place);
  17. #define Desk_error__SR(x) Desk_error__VL(x)
  18. #define Desk_error__VL(x) #x
  19. #define Desk_error_PLACE "File '" __FILE__ "', line " Desk_error__SR(__LINE__) ". "
  20. #ifdef Desk__using_SDLS
  21. extern Desk_os_error *Desk_Error__Ref_global(void);
  22. #endif
  23. #if defined(Desk__using_SDLS) && !defined(Desk__making_Error)
  24. #define Desk_error_global (*Desk_Error__Ref_global())
  25. #else
  26. extern Desk_os_error Desk_error_global;
  27. #endif
  28. #define Desk_error_FIXED(id, number, description) \
  29. const struct { \
  30. int errnum; \
  31. char errmess[ 1 + sizeof(description)]; \
  32. } \
  33. id##_= { number, description}; \
  34. Desk_os_error *id = (Desk_os_error *) &id##_
  35. #define Desk_error_STATIC(id, number, description) \
  36. static const struct { \
  37. int errnum; \
  38. char errmess[ 1 + sizeof(description)]; \
  39. } \
  40. id##_= { number, description}; \
  41. static Desk_os_error *id = (Desk_os_error *) &id##_
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45. #endif
  46.